<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>心电监护设置</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="css/weui.css"/>
    <link rel="stylesheet" href="css/weuix.css"/>
    <script src="js/zepto.min.js"></script>
    <script src="js/zepto.weui.js"></script>
    <style>
        .placeholder {
            margin: 5px;
            padding: 0 10px;
            height: 2.3em;
            line-height: 2.3em;
            text-align: left;    
        }
    </style>
       <script>
        $(function(){
            $(document).on("input", "#input-heart", function() {
                var heart =  $('#input-heart').val();
                 if (heart < 10 || heart >= 1000) {
                    $('#txt-heart-1').text("-");
                    $('#txt-heart-2').text("-");
                 } else {
                     if  (heart > 60 && heart < 100) {
                         $('#txt-heart-1').text("60");
                         $('#txt-heart-2').text("100");
                     } else if (heart >= 100) {
                         var heart_temp1 = heart * 1.05;
                         var heart_temp2 = heart * 1.1;
                         $('#txt-heart-1').text(Math.floor(heart_temp1) + " ~ " + Math.floor(heart_temp2)) ;
                         var heart_temp3 = heart * 0.7;
                         var heart_temp4 = heart * 0.8;
                         $('#txt-heart-2').text(Math.floor(heart_temp3) + " ~ " + Math.floor(heart_temp4)) ;
                
                     } else  {
                         var heart_temp1 = heart * 1.2;
                         var heart_temp2 = heart * 1.3;
                         $('#txt-heart-1').text(Math.floor(heart_temp1) + " ~ " + Math.floor(heart_temp2)) ;
                         var heart_temp3 = heart * 0.9;
                         var heart_temp4 = heart * 0.95;
                         $('#txt-heart-2').text(Math.floor(heart_temp3) + " ~ " + Math.floor(heart_temp4)) ;
                
                     }
                 }
            });


            $(document).on("input", "#input-xy-s", function() {
                var heart =  $('#input-xy-s').val();
                 if (heart < 10 || heart >= 1000) {
                    $('#txt-xys-1').text("-");
                    $('#txt-xys-2').text("-");
                 } else {
                     if  (heart > 90 && heart < 140) {
                         $('#txt-xys-1').text("90");
                         $('#txt-xys-2').text("140");
                     } else if (heart >= 140) {
                         var heart_temp1 = heart * 1.05;
                         var heart_temp2 = heart * 1.1;
                         $('#txt-xys-1').text("(高) " + Math.floor(heart_temp1) + " ~ " + Math.floor(heart_temp2)) ;
                         var heart_temp3 = heart * 0.7;
                         var heart_temp4 = heart * 0.8;
                         $('#txt-xys-2').text("(高) " + Math.floor(heart_temp3) + " ~ " + Math.floor(heart_temp4)) ;
                
                     } else  {
                         var heart_temp1 = heart * 1.2;
                         var heart_temp2 = heart * 1.3;
                         $('#txt-xys-1').text("(低) " + Math.floor(heart_temp1) + " ~ " + Math.floor(heart_temp2)) ;
                         var heart_temp3 = heart * 0.9;
                         var heart_temp4 = heart * 0.95;
                         $('#txt-xys-2').text("(低) " +Math.floor(heart_temp3) + " ~ " + Math.floor(heart_temp4)) ;
                
                     }
                 }
            });


            $(document).on("input", "#input-xy-x", function() {
                var heart =  $('#input-xy-x').val();
                 if (heart < 10 || heart >= 1000) {
                    $('#txt-xyx-1').text("-");
                    $('#txt-xyx-2').text("-");
                 } else {
                     if  (heart > 60 && heart < 90) {
                         $('#txt-xyx-1').text("60");
                         $('#txt-xyx-2').text("90");
                     } else if (heart >= 90) {
                         var heart_temp1 = heart * 1.05;
                         var heart_temp2 = heart * 1.1;
                         $('#txt-xyx-1').text("(高) " + Math.floor(heart_temp1) + " ~ " + Math.floor(heart_temp2)) ;
                         var heart_temp3 = heart * 0.7;
                         var heart_temp4 = heart * 0.8;
                         $('#txt-xyx-2').text("(高) " + Math.floor(heart_temp3) + " ~ " + Math.floor(heart_temp4)) ;
                
                     } else  {
                         var heart_temp1 = heart * 1.2;
                         var heart_temp2 = heart * 1.3;
                         $('#txt-xyx-1').text("(低) " + Math.floor(heart_temp1) + " ~ " + Math.floor(heart_temp2)) ;
                         var heart_temp3 = heart * 0.9;
                         var heart_temp4 = heart * 0.95;
                         $('#txt-xyx-2').text("(低) " +Math.floor(heart_temp3) + " ~ " + Math.floor(heart_temp4)) ;
                
                     }
                 }
            });

           


        });

    </script>
</head>
<body ontouchstart>
    <div>
    <div class="weui-flex">
        <div ><div class="placeholder" >心率报警上限</div></div>
        <div class="weui-flex__item"><div class="placeholder" id= "txt-heart-1">-</div></div>
       
    </div>
    <div class="weui-flex">
        <div ><div class="placeholder">心率报警下限</div></div>
        <div class="weui-flex__item"><div class="placeholder" id= "txt-heart-2">-</div></div>
        
    </div>
    <div class="weui-flex">
        <div ><div class="placeholder">收缩压报警上限</div></div>
        <div class="weui-flex__item"><div class="placeholder" id= "txt-xys-1">-</div></div>
       
    </div>
    <div class="weui-flex">
        <div ><div class="placeholder">收缩压报警下限</div></div>
        <div class="weui-flex__item"><div class="placeholder" id= "txt-xys-2">-</div></div>
       
    </div>

    <div class="weui-flex">
        <div ><div class="placeholder">舒张压报警上限</div></div>
        <div class="weui-flex__item"><div class="placeholder" id= "txt-xyx-1">-</div></div>
       
    </div>
    <div class="weui-flex">
        <div ><div class="placeholder">舒张压报警下限</div></div>
        <div class="weui-flex__item"><div class="placeholder" id= "txt-xyx-2">-</div></div>
       
    </div>

</div>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">心率</label></div>
        <div class="weui-cell__bd">
            <input id = "input-heart" class="weui-input" pattern="[0-9]*" placeholder="次/分" type="number">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">收缩压</label></div>
        <div class="weui-cell__bd">
            <input  id = "input-xy-s" class="weui-input" pattern="[0-9]*" placeholder="mmgh" type="number">
        </div>
    </div>
   <div class="weui-cell">
    <div class="weui-cell__hd"><label class="weui-label">舒张压</label></div>
        <div class="weui-cell__bd">
            <input id = "input-xy-x"  class="weui-input" pattern="[0-9]*" placeholder="mmgh" type="number">
        </div>
    </div>
</div>
<br/>
<br/>
<table>
    <thead>
    <tr><th>异常情况</th><th>收缩压</th><th>舒张压</th></tr>
    </thead>
    <tbody >

    <tr><td>急性缺血性卒中</td><td><200</td><td ><110</td></tr>
    <tr><td>急性缺血性卒中（有静脉溶栓适应症）</td><td><185</td><td ><110</td></tr>
    <tr><td>急性缺血性卒中（未接受静脉溶栓且计划实施机械取栓）</td><td >≤185</td><td>≤110</td></tr>
    <tr><td>血管开通后</td><td >低于基础血压20-30，不低于90</td><td >低于基础血压20-30，不低于60</td></tr>
    <tr><td>出血性脑卒中（收缩压150-220）</td><td >130-140</td><td ></td></tr>
    <tr><td>出血性脑卒中（收缩压>220）</td><td>160</td><td></td></tr>

</tbody>
</table>
</body>
</html>

